<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="c_rt" uri="http://java.sun.com/jstl/core_rt" %>
<%@ page import="cn.net.withub.dataCollector.common.model.TCollectorElement" %>
<%
  String path=request.getContextPath();
  String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path;
  TCollectorElement tCollectorElement = (TCollectorElement)request.getAttribute("tCollectorElement");
%>
<%--
  Created by IntelliJ IDEA.
  User: yuanjie
  Date: 2018/5/8
  Time: 7:59
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<script type="text/javascript" src="<%=basePath %>/resources/jquery-1.9.1.js"></script>
${tCollectorContent.content}

<script type="text/javascript">
  $(function(){
      loadImage();
  });

  /**
  *加载页面图片
   */
  function loadImage(){
      $.post("<%=basePath%>/collectorController/getElementList",{id:"${id}"},function(data){
          if(data != null){
              $("IMG").each(function(){
                  var src = $(this).attr("src");
                  for(var i=0;i<data.length;i++){
                    var title = data[i].title;
                    if(src.indexOf(title)>-1){
                        $(this).attr("src",data[i].wjlj)
                    }
                  }
              })
          }
      })
  }
</script>
